package com.ruicar.afs.cloud.workflow.gwt.service;

import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruicar.afs.cloud.common.core.security.vo.UserVo;
import com.ruicar.afs.cloud.workflow.api.dto.flowprocess.WorkFlowResponse;
import com.ruicar.afs.cloud.workflow.api.dto.flowprocess.request.*;
import com.ruicar.afs.cloud.workflow.api.dto.flowprocess.response.FLowNodeUserBean;
import com.ruicar.afs.cloud.workflow.api.dto.flowprocess.response.FlowCmdBean;
import com.ruicar.afs.cloud.workflow.api.dto.flowprocess.response.FlowInstanceBean;
import com.ruicar.afs.cloud.workflow.api.dto.flowprocess.response.FlowNodeBean;

import java.util.List;

public interface WorkflowService {
    WorkFlowResponse startWorkFlow(StartFlowRequest startFlowRequest, JSONObject bizData);

    WorkFlowResponse taskSubmit(TaskSubmitRequest taskSubmitRequest, JSONObject bizData);

    WorkFlowResponse taskReformist(TaskReformistRequest taskReformistRequest, JSONObject bizData);

    WorkFlowResponse taskCallBack(TaskCallBackRequest taskCallBackRequest, JSONObject bizData);

    WorkFlowResponse<FlowInstanceBean> queryFlowInstance(QueryFlowInstanceRequest queryFlowInstanceRequest);

    WorkFlowResponse<List<FlowCmdBean>> queryFlowCmd(QueryFLowCmdRequest queryFLowCmdRequest);

    WorkFlowResponse flowGiveUp(FLowGiveUpRequest fLowGiveUpRequest);

    WorkFlowResponse<List<FlowNodeBean>> queryAllNode();

    WorkFlowResponse<Page<FlowNodeBean>> pageQueryNode(Page page);

    WorkFlowResponse<Page<FLowNodeUserBean>> queryNodeUser(String nodeId, long pageIndex, long pageSize);


    WorkFlowResponse addNodeUser(String nodeId, List<UserVo> userList);

    WorkFlowResponse changeTotalWeight(String userName, int totWeight);

    WorkFlowResponse changeWeight(List<String> gwtUserIds, int weight);

    WorkFlowResponse clearTaskCount(List<String> gwtUserIds);

    WorkFlowResponse removeNodeUsers(List<String> gwtUserIds);

    WorkFlowResponse moveUserToNode(String gwtUserId, String oldNodeId, String newNodeId);

    WorkFlowResponse resumeFlow(String dataId,String exceptionId);

    WorkFlowResponse pauseFlowInstance(String flowInstanceId);
}
